<script type="text/javascript">
$(function(){
	$.post("fileEntering/queryCardNoDetail",queryCardNoDetail,"json")
})
function queryCardNoDetail(item){
	if(item.statusCode==DWZ.statusCode.error){
		navTabAjaxDone(item)
	}else{
		var content;
		var numPerPage=item.numPerPage;
		var currentPage=item.currentPage;
		var totalCount=item.totalCount;
		var pageCount=item.pageCount;
		var list=item.pagedList;
		if(list.length==0){
			content+="<tr><td colspan='7' align='center' >未查询到数据</td></tr>"
		}else{
			for(var i=0;i<list.length;i++){
				var isUseUp=list[i].isUseUp=="0"?"未用完":"已用完";
				content+="<tr onmouseover='moveoverMouse(this)' onmouseout='moveoutMouse(this)' align='center'><td><a href='#' onclick='return cardNoUseDetail(this)'>"+list[i].id+"</a></td><td>"+
				list[i].cardpName+"</td><td>"+list[i].startSegmentNo+"</td><td>"+list[i].endSegmentNo+"</td><td>"+
				list[i].num+"</td><td>"+list[i].fileName+"</td><td>"+list[i].usedSegmentNo+"</td><td>"+isUseUp+"</td></tr>"
			}
			
		}
		$("#tbodyByCardNoDetail").html(content);
		$("input[name='numPerPage']").val(numPerPage);
		$("input[name='pageNum']").val(currentPage); 
		$("#totalCountByCardNoDetail").text("条，共"+totalCount+"条");
		$("#paginationByCardNoDetail").addClass("pagination").attr("targetType","navTab").attr("totalCount",totalCount).attr("numPerPage",numPerPage).attr("pageNumShown","10").attr("currentPage",currentPage).attr("rel","lossCard").attr("callback","getLoosCardInfo");
		$("#paginationByCardNoDetail").each(function(){
			var $this = $(this);
			$this.pagination({
				targetType:"dialog",
				rel:"tbodyByCardNoDetail",
				totalCount:totalCount,
				numPerPage:numPerPage,
				pageNumShown:10,
				currentPage:currentPage,
				callback:queryCardNoDetail
			});
		});
		var $p = $("#cardNoDetail");
		initUI($p);
	}	
}

function cardNoUseDetail(a){
	var cardnoGeneratId=$(a).text();
	var options={"width":"450","mask":false,"height":"300","cardnoGeneratId":cardnoGeneratId};
	$.pdialog.open("fileEntering/goCardNoUseDetail","cardNoUseDetail", "卡号使用记录",options);
	$.pdialog.resizeDialog({style: {left: 1350, top: 250}}, $.pdialog.getCurrent(), "w");
	//$.pdialog.resizeDialog({style: {left: 550, top: 290}}, $.pdialog.getCurrent(), "n");
}
</script>
<form id="pagerForm" method="post" action="fileEntering/queryCardNoDetail" class="pageForm required-validate" onsubmit="return validateCallback(this,queryCardNoDetail);">
	<input type="hidden" name="pageNum" value="" /> 
	<input type="hidden" name="numPerPage" value="" />
	<div class="searchBar">
		<div class="row" style="padding: 0 10px;">
			<div class="col-md-6 col-sm-12">
				<p>
					<label>是否使用完：</label>
					<select name="isUseUp" class="" >
						<option value="">请选择</option>
						<option value="0">未使用完</option>
						<option value="1">已使用完</option>
					</select>
				</p>
			</div>
			<div class="col-md-6 col-sm-12">
				<p>
					<label>卡产品：</label>
					<select name="cardpCode" class="" >
						<option value="">请选择</option>
						<option value="16">建设银行联名卡</option>
						<option value="15">潍坊银行联名卡</option>
					</select>
				</P>
			</div>
					
		</div>
		<div class="subBar">
			<ul> 
				<li>
				<div class="buttonActive" >
					<div class="buttonContent" >
					<button type="submit" >查询</button>
					</div>
				</div>
				</li>
			</ul>
		</div>
	</div>
</form>	

<div class="pageContent">
	<div id="cardNoDetail">
		<table class="table" width="100%" layoutH="188">
			<thead>
				<tr align="center">
					<th width="4%">序号</th>
					<th width="14%">卡产品</th>
					<th width="16%">开始号段</th>
					<th width="16">结束号段</th>
					<th width="10%">数量</th>
					<th width="20%">文件名</th>
					<th width="10%">已使用数量</th>
					<th width="10%">是否已用完</th>
				</tr>
			</thead>
			<tbody id="tbodyByCardNoDetail">

			</tbody>
		</table>
	</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage"
				onchange="dialogPageBreak({numPerPage:this.value},'tbodyByCardNoDetail',queryCardNoDetail)">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select> <span id="totalCountByCardNoDetail">条，共${totalCount}条</span>
		</div>

		<div callback='queryCardNoDetail' id="paginationByCardNoDetail"
			rel="tbodyByCardNoDetail" class="pagination" targetType="dialog"
			totalCount="200" numPerPage="5" pageNumShown="5" currentPage="1"></div>

	</div>
</div>
